﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="HolisticConverter.xaml.cs" company="R.V.Kasner">
//   Copyright © 2011 R.V.Kasner
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Owen.Terminal.View.Converters
{
    using System;
    using System.Globalization;
    using System.Windows.Data;

    public class HolisticConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool) return (bool)value ? string.Empty : "X";

            return value;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotSupportedException();
        }
    }
}